Testing
run
Starts test suite after is defined. Usually at the bottom of your Program.fs
1:
|
|
runFor
Starts test suite and runs the suite with each of the listed browsers. Usually at the bottom of your Program.fs
1: 2: |
|
context
Define the context of the tests. A default context is defined and used if one is not provided. You can have as many contexts as you like. Each context gets a new once/before/after/lastly function.
1: 2: 3: 4: 5: 6: 7: 8: |
|
once
Function that is run once time at the beginning of a test suite. (per context)
1: 2: 3: |
|
before
Function that is run before each test in a context. (per context)
1: 2: 3: |
|
after
Function that is run after each test in a context. (per context)
1: 2: 3: |
|
lastly
Function that is run once at the end of a context. (per context)
1: 2: 3: |
|
onPass
Function that is run after a test passes. (per context)
1: 2: 3: |
|
onFail
Function that is run after a test fails. (per context)
1: 2: 3: |
|
test
Standard test definition (name defined automatically by the test number eg: Test #1).
1: 2: 3: 4: 5: 6: |
|
&&& (named test, aliased as ntest)
Standard test definition with a name.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: |
|
&&&& (work in progress, aliased as wip)
Used for debugging. Test runs slower and highlights the elements that it is interacting with to help debug. If one test is marked wip, only wip tests are ran. Other tests are skipped.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: |
|
&&! (skip, aliased as xtest)
Do not run a test.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: |
|
&&&&& (always run, in both standard and wip modes)
Test will always be run. If some tests are marked work in progress, tests marked as always will also run. The test will run slow with wip tests, but run at normal speed when there are no wip tests.
1: 2: 3: 4: 5: 6: |
|
many
Run a single test X times. Helps with troubleshooting tests that sometimes fail.
1: 2: 3: 4: 5: 6: |
|
nmany
Run a single named test X times. Helps with troubleshooting tests that sometimes fail.
1: 2: 3: 4: 5: 6: |
|
todo
Mark a test as todo to fill in later. LiveHtmlReporter will mark todo tests in the output.
1:
|
|
from canopy
from canopy.runner
from canopy